import Vue from 'vue';
import Router from 'vue-router';
const loginPage = resolve => require(['@/page/common/login-page'], resolve) 
const rechargePassword = resolve => require(['@/page/common/recharge-password'], resolve) 
const bannerList = resolve => require(['@/page/consultManager/bannerList'],resolve)
const bannerEdit = resolve => require(['@/page/consultManager/bannerEdit'],resolve)
const consultList = resolve => require(['@/page/consultManager/consultList'],resolve)
const consultEdit = resolve => require(['@/page/consultManager/consultEdit'],resolve)
const bgSystem = resolve => require(['@/page/bgManager/bgSystem'],resolve)
const bgWeb = resolve => require(['@/page/bgManager/bgWeb'],resolve)
const accountEdit = resolve => require(['@/page/systemManager/accountEdit'],resolve)
const accountList = resolve => require(['@/page/systemManager/accountList'],resolve)
const roleEdit = resolve => require(['@/page/systemManager/roleEdit'],resolve)
const roleList = resolve => require(['@/page/systemManager/roleList'],resolve)
const staffList = resolve => require(['@/page/staffManager/staffList'],resolve)
const staffEdit = resolve => require(['@/page/staffManager/staffEdit'],resolve)
const staffDetail = resolve => require(['@/page/staffManager/staffDetail'],resolve)
const groupList = resolve => require(['@/page/staffManager/groupList'],resolve)
const projectList = resolve => require(['@/page/projectManager/projectList'],resolve)
const projectEdit = resolve => require(['@/page/projectManager/projectEdit'],resolve)
const projectDetail = resolve => require(['@/page/projectManager/projectDetail'],resolve)

Vue.use(Router)

export default new Router({
  mode: 'history',
  base:'/sys/', 
  routes: [
      {
          path: '/loginPage',
          name: 'loginPage',
          component: loginPage
      },
      {
        path: '/rechargePassword',
        name: 'rechargePassword',
        component: rechargePassword
      },
      {
        path: '/bannerList',
        name: 'bannerList',
        component: bannerList
      },
      {
        path: '/bannerEdit',
        name: 'bannerEdit',
        component: bannerEdit
      },
      {
        path: '/',
        name: 'consultList',
        component: consultList
      },
      {
        path: '/consultEdit',
        name: 'consultEdit',
        component: consultEdit
      },
      {
        path: '/bgSystem',
        name: 'bgSystem',
        component: bgSystem
      },
      {
        path: '/bgWeb',
        name: 'bgWeb',
        component: bgWeb
      },
      {
        path: '/accountEdit',
        name: 'accountEdit',
        component: accountEdit
      },
      {
        path: '/accountList',
        name: 'accountList',
        component: accountList
      },
      {
        path: '/roleEdit',
        name: 'roleEdit',
        component: roleEdit
      },
      {
        path: '/roleList',
        name: 'roleList',
        component: roleList
      },
      {
        path: '/staffList',
        name: 'staffList',
        component: staffList
      },
      {
        path: '/staffEdit',
        name: 'staffEdit',
        component: staffEdit
      },
      {
        path: '/groupList',
        name: 'groupList',
        component: groupList
      },
      {
        path: '/projectList',
        name: 'projectList',
        component: projectList
      },
      {
        path: '/staffDetail',
        name: 'staffDetail',
        component: staffDetail
      },
      {
        path: '/projectEdit',
        name: 'projectEdit',
        component: projectEdit
      },
      {
        path: '/projectDetail',
        name: 'projectDetail',
        component: projectDetail
      }
      
  ]
})
